# 增加操作

class Dict:
    def __init__(self):
        self.data = {}

    def add(self, key, value):
        self.data[key] = value

    def get(self, key):
        return self.data.get(key)

    def delete(self, key):
        del self.data[key]

    def update(self, key, value):
        self.data[key] = value

    def keys(self):
        return self.data.keys()

    def values(self):
        return self.data.values()

    def items(self):
        return self.data.items()


names = {
    "alex": [23, "CEO", 66000],
    "⿊姑娘": [24, "⾏政", 4000],
}
print(names)
# 新增k
names["佩奇"] = [26, "讲师", 40000]
print(names)
names.pop("alex")
print(names)
del names["⿊姑娘"]
print(names)
names.update({"⿊姑娘": [24, "⾏政", 4000]})
print(names)
names['alex'] = [23, "CEO", 66000]
print(names)
print(names.keys())
print(names.values())
print(names.items())
info = {
    "name": "路⻜学城",
    "mission": "帮⼀千万极客⾼效学编程",
    "website": "https://luffycity.com"
}
for k in info:
    print(k, info[k])

# 求长度
print(len(names))
